package no.ffi.gismoidm.invocations;

import java.io.Serializable;
import java.security.PublicKey;
import java.util.UUID;
import no.ffi.gismoidm.attrex.BooleanOperand;
import no.ffi.gismoidm.utils.IdentityStatement;
import no.ffi.gismoidm.utils.GismoIdmException;
import no.ffi.tpm.crypto.CryptoOperations;

/**
 *
 * @author anders
 */
public interface ServiceInvocation extends Serializable {

    IdentityStatement getIdentityStatement();

    UUID getNonce();

    Serializable getParameters();

    Serializable getReturns();

    int getAuthenticationProtocol();

    void validateRequest(PublicKey trustAnchor,long clockCounter, boolean acceptsExpiredIS) throws GismoIdmException ;
    void validateRequest(PublicKey trustAnchor,long clockCounter) throws GismoIdmException ;

    void validateResponse(UUID requestNonce, IdentityStatement crossIdentityStatement, 
                String serviceDN, BooleanOperand reqs, CryptoOperations crOp) throws GismoIdmException;
    void validateResponse(UUID requestNonce, IdentityStatement crossIdentityStatement, 
                String serviceDN, BooleanOperand reqs, CryptoOperations crOp, boolean acceptsExpiredIS) throws GismoIdmException;

}
